package com.xjoyt.pay.gateway.interfaces;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.xjoyt.pay.dto.AccessParam;
import com.xjoyt.pay.dto.ExecuteResult;
import com.xjoyt.pay.dto.PageParam;
import com.xjoyt.pay.dto.PageResult;
import com.xjoyt.pay.gateway.params.Order;
import com.xjoyt.pay.gateway.params.OrderExternalParam;
import com.xjoyt.pay.gateway.params.OrderParam;
import com.xjoyt.pay.master.dto.ScannedCodeResult;
import com.xjoyt.pay.master.params.OrderPageParam;

public interface OrderContract {

	/**
	 * 微信扫码统一下单
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "wechatScan", method = RequestMethod.POST)
	ExecuteResult<?> wechatScan(AccessParam<OrderParam> param);

	/**
	 * 支付宝扫码统一下单
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "alipayScan", method = RequestMethod.POST)
	ExecuteResult<?> alipayScan(AccessParam<OrderParam> param);

	/**
	 * 网关支付统一下单
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "bankPay", method = RequestMethod.POST)
	ExecuteResult<String> bankPay(AccessParam<OrderParam> param);

	/**
	 * 支付宝wap支付统一下单
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "alipayWapPay", method = RequestMethod.POST)
	ExecuteResult<String> alipayWapPay(AccessParam<OrderParam> param);

	/**
	 * 微信wap支付统一下单
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "wechatWapPay", method = RequestMethod.POST)
	ExecuteResult<String> wechatWapPay(AccessParam<OrderParam> param);
	
	/**
	 * 被扫码支付统一下单
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "scannedCodePay", method = RequestMethod.POST)
	ExecuteResult<ScannedCodeResult> scannedCodePay(AccessParam<OrderParam> param);

	/**
	 * 通过系统单号呼求偶订单
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "getByNo", method = RequestMethod.POST)
	ExecuteResult<Order> getByNo(AccessParam<String> param);

	/**
	 * 通过第三方单号获取订单
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "getByCustomerNo", method = RequestMethod.POST)
	ExecuteResult<Order> getByCustomerNo(AccessParam<String> param);

	/**
	 * 查询分页订单
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "loadPage", method = RequestMethod.POST)
	ExecuteResult<PageResult<Order>> loadPage(AccessParam<PageParam<OrderPageParam>> param);

	/**
	 * 代理商查询分页订单
	 * 
	 * @param param
	 * @return
	 */
	@RequestMapping(value = "loadOrderPage", method = RequestMethod.POST)
	ExecuteResult<PageResult<OrderExternalParam>> loadOrderPage(AccessParam<PageParam<OrderPageParam>> param);
}
